package com.eland.oa.main.constant;

public class ELOpCode {

	/**
	 * 4 types of operation code:
	 * 1. Plain - P
	 * 2. Error - E
	 * 3. Warning - W
	 * 4. Success - S
	 * 
	 * Corresponding messages will be stored in ELOpMessage class in a three dimension array.
	 * Dimension 1 - Type Space
	 * Dimension 2 - Operation Space
	 * Dimension 3 - Message Space
	 */
	
	/* Section 1 */
	/* ========== Type Space Index ========== */
	public static final Integer TYP_MIN = 0;
	public static final Integer TYP_PLAIN = 0;									//Plain message type
	public static final Integer TYP_ERROR = 1;									//Error message type
	public static final Integer TYP_WARNING = 2;								//Warning message type
	public static final Integer TYP_SUCCESS = 3;								//Success message type
	public static final Integer TYP_MAX = 3;
	//End of Section 1
	
	
	/* Section 2 */
	/* ========== Operation Space Index ========== */
	public static final Integer OP_MIN = 0;
	public static final Integer OP_SYS_LOGIN = 0;								//System login operation
	public static final Integer OP_MAX = 0;
	//End of Section 2
	
	
	/* Section 3 */
	/* ========== Message Space Index ========== */
	
		/* Section 3.1 */
		/* SYS_LOGIN Messages */
	
			/* Section 3.1.1 */
			//SYS_LOGIN --- TYP_PLAIN: index=00*
			public static final Integer MSG_LOGIN_P_WELCOME_TO_SYSTEM = 0;						//Welcome to system
			public static final Integer MSG_LOGIN_P_USER_ALREADY_AUTHCED = 1;					//User has already been authenticated
	
			/* Section 3.1.2 */
			//SYS_LOGIN --- TYP_ERROR: index=10*
			public static final Integer MSG_LOGIN_E_USER_NOT_AUTHCED = 0;						//User is not authenticated
			public static final Integer MSG_LOGIN_E_INVALID_LOGIN = 1;							//Invalid user name or password
			public static final Integer MSG_LOGIN_E_EXPIRE_IDENTITY = 2;						//Expired user identity
			public static final Integer MSG_LOGIN_E_USER_NAME_EMPTY = 3;						//Empty user name field
			public static final Integer MSG_LOGIN_E_PWD_EMPTY = 4;								//Empty password field
			public static final Integer MSG_LOGIN_E_PWD_LESS_THAN_EIGHT = 5;					//Password field length less than 8
			
			/* Section 3.1.3 */
			//SYS_LOGIN --- TYP_WARNING: index=20*
			public static final Integer MSG_LOGIN_W_SESSION_EXPIRE = 0;							//User session has expired
	
			/* Section 3.1.4 */
			//SYS_LOGIN --- TYP_SUCCESS: index=30*
			public static final Integer MSG_LOGIN_S_LOGIN_SUCCESS = 0;							//Successful login
		
		//End of Section 3.1
	
	//End of Section 3
}
